package sr.myserver.vo.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * 分页请求参数
 */
@ApiModel(value = "分页请求参数", description = "分页请求参数")
public class PageRequest {
    /**
     * 分页参数
     */
    @Setter
    @Schema(description = "分页参数")
    PageInfo page;
    /**
     * 查询条件(支持增加对象)
     */
    @Setter
    @Getter
    @Schema(description = "查询条件(支持增加对象)")
    Map<String, Object> queryData;

    public Page getPage() {
        Page pg = new Page();
        pg.setCurrent(page.getCurrent());
        pg.setSize(page.getSize());
        return pg;
    }
}
